

  CREATE EXTERNAL TABLE jms_dwd.dwd_terminal_barscan_union_tmp_back(
  `billcode` string COMMENT '运单号',
  `lst_end_network_arrival_time` string COMMENT '末端网点最晚到件时间',
  `lst_end_network_code` string COMMENT '最晚末端网点',
  `lst_end_network_source` string COMMENT '最晚末端网点来源',
  `lst_site_town_id` string COMMENT '最晚到出一体乡镇id',
  `lst_site_scan_user_code` string COMMENT '最晚网点扫描员',
  `lst_deliver_time` string COMMENT '最晚出仓时间',
  `lst_deliver_network_id` string COMMENT '最晚出仓网点id',
  `lst_deliver_network_code` string COMMENT '最晚出仓网点code',
  `lst_deliver_user_code` string COMMENT '最晚出仓扫描员',
  `lst_deliver_unrecordflag` string COMMENT '最晚未录单标识',
  `lst_deliver_township_id` string COMMENT '最晚出仓乡镇id',
  `lst_deliver_source` string COMMENT '最晚出仓来源',
  `lst_deliver_scan_user_code` string COMMENT '最晚新增出仓扫描员',
  `lst_deliver_check_flag` string COMMENT '最晚新增核算标识',
  `fst_transfer_aging_sign_time` string COMMENT '最早转邮时效签收时间',
  `fst_transfer_aging_sign_network_code` string COMMENT '最早转邮时效签收网点',
  `fst_transfer_aging_sign_scan_type` string COMMENT '最早转由签收扫描类型',
  `fst_transfer_aging_sign_user_code` string COMMENT '最早转由时效签收扫描员',
  `fst_transfer_aging_sign_pistolid` string COMMENT '巴枪id PDD开头是桃花岛其他是自助对接',
  `lst_collect_in_time` string COMMENT '最晚入库时间',
  `lst_collect_in_network_code` string COMMENT '最晚入库网点',
  `lst_collect_in_terminal_type` string COMMENT '对接终端类型 驿站or柜机',
  `lst_collect_in_terminal_source` string COMMENT '对接终端来源 快宝驿站、丰巢等',
  `lst_collect_in_terminal_name` string COMMENT '对接终端名称、地址',
  `lst_collect_out_time` string COMMENT '出库时间',
  `lst_collect_out_network_code` string COMMENT '出库网点',
  `lst_collect_out_user_code` string COMMENT '出库扫描员',
  `lst_collect_out_terminal_type` string COMMENT '对接终端类型 驿站or柜机',
  `lst_collect_out_terminal_source` string COMMENT '对接终端来源 快宝驿站、丰巢等',
  `lst_collect_out_terminal_name` string COMMENT '对接终端名称、地址',
  `lst_deliver_out_time` string COMMENT '快件取出时间',
  `lst_deliver_out_network_code` string COMMENT '快件取出网点',
  `order_source_code` string COMMENT '订单来源',
  `order_source_name` string COMMENT '订单来源名称',
  `goods_type_code` string,
  `goods_type_name` string,
  `third_code` string,
  `pick_network_code` string,
  `pick_network_name` string,
  `third_name` string,
  `customer_code` string,
  `customer_name` string,
  `operate_time` string,
  `township_name` string,
  `express_type_code` string COMMENT '产品类型编码',
  `express_type_name` string COMMENT '产品类型名称',
  print_network_code string comment '退转件打印网点编码',
  print_network_name string comment '退转件打印网点名称',
  apply_network_code string comment '申请网点编码',
  apply_network_name string comment '申请网点名称',
  entry_type string comment '录入类型 1拦截件 2 问题件',
   origin_network_flag smallint comment '是否退回揽收网点 1是 2否',
   is_send tinyint comment '网点做退转寄之后是否有做发件',--网点做退转寄之后是否有做发件
   lst_end_network_send_time TIMESTAMP comment '末端网点发件时间',
   print_time TIMESTAMP comment '退转件打印时间',
   reback_transfer_apply_time TIMESTAMP comment '退转件申请时间'
  )
COMMENT '末端操作合并中间表'
ROW FORMAT SERDE
  'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'
STORED AS INPUTFORMAT
  'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'
OUTPUTFORMAT
  'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'
LOCATION
  'hdfs://yl-bg-hdp/dw/hive/jms_dwd.db/external/dwd_terminal_barscan_union_tmp_back'